package com.demo.controller;

import com.demo.service.StudentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;

/**
 * Created by IntelliJ IDEA.
 * User: zm
 * Date: 2023/4/17
 */
@Controller
public class StudentController {
    //使用属性注入的方法
    @Autowired
    private StudentService studentService;

    public void sayHi(){
        //调用service
        studentService.sayHi();
    }
}
